package com.leon.lifeenginespace.spring;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;

/**
 * @description: @AutoWiredBean 处理器
 * @author: WT
 * @date: 2024/4/30 0:20
 * @Version 1.0
 **/
public class AutoWiredBeanPostProcessor {

    public static void main(String[] args) {
        //applicationContext
        DefaultListableBeanFactory defaultListableBeanFactory = new DefaultListableBeanFactory();
        BeanDefinition bd = new RootBeanDefinition(LifeCycleBean.class);
        defaultListableBeanFactory.registerBeanDefinition("bd", bd);
        defaultListableBeanFactory.registerSingleton("bd", new LifeCycleBean());

    }
}